<?php
# file that will process and save to database new user

# include of site functions
include_once $_SERVER["DOCUMENT_ROOT"].'Meet-n-go/php/includes.php'; 	// contains includes of all files with functions
session_start();					// starts session for current user
c_db_connect(); 					// connect to database

# make sure all data was entered
if(!isset($_POST['search_text']) || empty($_POST['search_text'])) i_set_msg_err('Empty Group name');
else{
	$search_text = c_escape($_POST['search_text']); // escape before doing something with it
}

c_db_disconnect(); 					// disconnect from database

# Where to go after processing
if( has_errors() ) 	$page_id = I_SEARCH_GROUP; // if there are erros, go back to simple 
else 				$page_id = I_SEARCH_GROUP.'&group='.$search_text; // if there are no erros, go back to login page


# code that makes sure, this page is being redirected from afterwards
echo '<head><meta http-equiv="refresh" content="0; url=../../../index.php?id=' . $page_id . '" /></head>';


?>